import React from 'react';
import { Form } from 'antd';
import { AxCreateForm } from '@/components/AxForm/AxCreateForm';
import { AxInputNumber, AxLabel, AxSelect, AxSelectSearch } from '@/components/AxForm/AxFormItem';

const Update: React.FC<any> = props => {
    const { form, ...rest } = props;

    return (
        <>
            <AxCreateForm
                form={form}
                title='调整最大库存'
                {...rest}
                items={[
                    <AxLabel form={form} label="目录名称" field="template" value='浓硫酸' />,
                    <AxLabel form={form} label="CAS编码" field="template" value='As-5454545' />,
                    <AxLabel form={form} label="性状" field="template" value='液态' />,
                    <AxLabel form={form} label="最大库存" field="template" value='1000' />,
                    <AxSelect
                        form={form}
                        label="调整方式"
                        field="campusId2"
                        required
                        data={[{
                            text: '增加',
                            value: '增加',
                        }, {
                            text: '减少',
                            value: '减少',
                        }]}
                    />,
                    <AxInputNumber
                        form={form}
                        label="调整量"
                        field="campusId2"
                        required
                    />,
                    <AxSelectSearch
                        form={form}
                        label="审核接收人"
                        field="campusId2"
                        required
                    />,
                ]}
            />
        </>
    );
};

export default Form.create<any>()(Update);
